//
//  ShopGoodCollectionViewCell.m
//  BaseFrame
//
//  Created by 孟学浩 on 2017/5/18.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "ShopGoodCollectionViewCell.h"

@interface ShopGoodCollectionViewCell()

@property (nonatomic,strong) UIImageView *imgView;

@end

@implementation ShopGoodCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        self.contentView.backgroundColor = [UIColor whiteColor];
        
        _imgView = [UIImageView new];
        _imgView.contentMode = UIViewContentModeScaleAspectFill;
        
        _imgView.layer.masksToBounds = YES;
        
        [self.contentView addSubview:_imgView];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    _imgView.frame = self.bounds;
}

- (void)setModel:(NSDictionary *)model{
    _model = model;
    [_imgView sd_setImageWithURL:[NSURL URLOffsetIPWithString:model[@"first_picture"]]];
}

@end
